package cn.com.api.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiU_against;

import cn.com.api.mapper.ApiU_againstMapper;

import cn.com.api.service.ApiU_againstService;
import cn.com.api.service.impl.base.U_againstServiceImplBase;

/**
 * 
 **/
@Service
public class ApiU_againstServiceImpl extends U_againstServiceImplBase implements ApiU_againstService {
	@Autowired
	private ApiU_againstMapper apiU_againstMapper;

	// 新增对象后返回记录ID
	public int U_againstInsertion(ApiU_against u_against) {
		return this.apiU_againstMapper.U_againstInsertion(u_against);
	}

	public ApiU_against findAgainst(String user_id, String accusal_id, String type) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("conn_id", accusal_id);
		map.put("type", type);
		map.put("against_uid", user_id);
		return apiU_againstMapper.findAgainstByMap(map);
	}

}
